<template>
 	<view class="please">
 		<uniTabs :tabs="tabs" :activeTab="activeTab" lineHeight="false" @change="change" activeColor="#DD524D"
 			class="tabs"></uniTabs>
 		<view class="past_membership" v-show="activeTab===1">
 			<u-time-line>
				<u-time-line-item v-if="company_information.length>0" v-for="(item,index) in company_information" :key="index">
					<template v-slot:content>
						<view>
							<view class="u-order-desc">{{item.name}}</view>
							<view class="u-order-time">{{item.date}}</view>
						</view>
					</template>
				</u-time-line-item>
			</u-time-line>
			
 		</view>
		<image v-if="company_information.length<1"  style="position: absolute;top:0;left: 0;bottom: 0;right: 0;margin: auto;width: 600rpx;" src="../../../static/image/no-data.png" mode=""></image>
		
 	</view>
 </template>

 <script>
 	import uniTabs from '../../../components/v-tabs/v-tabs.vue'
    import request from '@/static/js/request.js'
 	export default {
 		data() {
 			return {
 				tabs: [
 					// '在建项目',
 					'完工项目',
 				],
 				activeTab: 1,
				company_information:[]
 			}
 		},
 		components: {
 			uniTabs
 		},
		onShow() {
			this.userinfo = JSON.parse(uni.getStorageSync('userInfo'));
			 let data = {
						  model:'jhj.team',
						  function_name:'_api_public_jhj_team_browse_one',
						  team_id:this.userinfo.team_id
			 }
			request.post('/api/v1/public_getattr/0', data).then(res => {
						   console.log(res.data)
						   this.company_information = res.data.company_list
			}).catch(e => {
				uni.showToast({
					icon: 'none',
					title: e.message
				})
			})
		},
 		methods: {
 			change(index) {
 				this.activeTab = index
 			}
 		}
 	}
 </script>

 <style lang="less" scoped>
	 .please{
		 height: 100vh;
		 background-color: #EBEEF5;
	 }
 	.tabs {
 		position: relative;
 	}

 	/deep/ .v-tabs {
 		width: 100%;
 		height: 100rpx;
 		background-color: #FFFFFF;
 		line-height: 100rpx;
 	}

 	/deep/ .v-tabs__container-item {
 		width: 100%;
 		justify-content: center;
 	}

 	.subjection {
 		padding: 20rpx;
 		justify-content: space-between;
		background: #fff;
		margin-top: 10rpx;

 		text {
 			line-height: 50rpx;
 			display: inline-block;
 		}

 		.content {
 			display: flex;
 			justify-content: space-between;

 			.baseinfo {
 				display: flex;
 				flex-direction: column;
 			}

 			.company {
 				font-size: 34rpx;
 				font-weight: bold;
 			}

 			.image-logo {
 				width: 120rpx;
 				height: 120rpx;
 			}
 		}

 		.information {
 			view {
 				line-height: 50rpx;
 			}
 		}

 		.message {
 			text-indent: 60rpx;
 			color: #7B7B7B;
 		}
 	}

	.past_membership{
		// padding: 30rpx;
		background: #fff;
		margin-top: 10rpx;
		.u-node {
			width: 44rpx;
			height: 44rpx;
			border-radius: 100rpx;
			display: flex;
			justify-content: center;
			align-items: center;
			background: #d0d0d0;
		}
		
		.u-order-desc {
			color: #000;
			font-size: 28rpx;
			margin-bottom: 6rpx;
		}
		
		.u-order-time {
			color: #7B7B7B;
			font-size: 26rpx;
		}
		/deep/.u-time-axis::before{
			background: #E85562;
			width: 1rpx;
		}
		/deep/.u-dot{
			background: #E85562;
		}
	}
 </style>
